<?php
/**
 * Niushop商城系统 - 团队十年电商经验汇集巨献!
 * =========================================================
 * Copy right 2019-2029 杭州牛之云科技有限公司, 保留所有权利。
 * ----------------------------------------------
 * 官方网址: https://www.niushop.com
 * =========================================================
 */

namespace app\shop\controller;

use app\model\goods\Config as GoodsConfigModel;
use app\model\system\Pay;
use app\model\system\Servicer as ServicerModel;
use app\model\web\Config as ConfigModel;
use app\model\system\Api;
use extend\RSA;
use app\model\system\Upgrade;
use app\model\system\Config as SystemConfig;
use think\facade\Cache;
use app\model\lingfeng\Lfuser;

/**
 * 设置 控制器
 */
class Lingfeng extends BaseShop
{
    /**
     * 商品列表
     * @return mixed
     */
    public function index()
    {
        
        

        return $this->fetch("lingfeng/lists");
        
    }
    
    public function lists(){
        
        $page = input('page', 1);
        $page_size = input('page_size', PAGE_LIST_ROWS);
        $order = '';
        $field = '*';
        $Lfuser = new Lfuser();
        $result = $Lfuser->getPageList([], $page, $page_size, $order, $field);
        $list = $result[ 'data' ][ 'list' ];
        $arr = [];
        foreach ($list as $value) {
            $data = json_decode($value['data'],true);
            $data['id'] = $value['id'];
            $arr[] = $data;
        }
        $result[ 'data' ][ 'list' ] = $arr;
        return $result;
        
    }
}